package com.blueocean_health.care.management.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.blueocean_health.care.management.domain.dto.OrderInfoPriceDto;
import com.blueocean_health.care.management.domain.dto.PriceDto;
import com.blueocean_health.care.management.util.MyMapper;

@Mapper
public interface PriceMapper extends MyMapper<PriceDto> {
	
	/*
	含有不选科室时的默认价格，但是不区分医院
	@Select("SELECT * FROM order_price_v WHERE illness_id=#{illnessGrade} AND service_id=#{serviceType}")
	List<PriceDto> findPrice(OrderInfoPriceDto orderInfoPriceDto);*/


	@Select("SELECT * FROM order_price_v t1,department t2 " +
			"WHERE " +
			"t1.`dept_id` = t2.`dept_id` " +
			"AND t2.`hospital_id` =#{hid} " +
			"AND illness_id=#{illnessGrade} " +
			"AND service_id=#{serviceType}")
	List<PriceDto> findPrice(OrderInfoPriceDto orderInfoPriceDto);
	
}
